<html>
<head><meta charset="utf-8"><title>Miri slowing down · miri · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/index.html">miri</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html">Miri slowing down</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226755297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226755297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226755297">(Feb 18 2021 at 01:51)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> As part of the playground's CI, I make sure that Miri is hooked up by running this code:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">a</span>: <span class="p">[</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[];</span><span class="w"></span>
<span class="w">        </span><span class="k">unsafe</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="o">*</span><span class="n">a</span><span class="p">.</span><span class="n">get_unchecked_mut</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>The test allows 5 seconds from clicking the Miri menu item until the response comes back (this includes network time, Docker spin up time, etc). That test has failed fairly reproducibly today (I haven't run these tests in a month or so). Just a heads up that there might be some recent slowdowns to look into.</p>



<a name="226756860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226756860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226756860">(Feb 18 2021 at 02:19)</a>:</h4>
<p>And now Miri fell out of toolstate, so it might be a day or so before the playground gets updated <span aria-label="wink" class="emoji emoji-1f609" role="img" title="wink">:wink:</span></p>



<a name="226784362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226784362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226784362">(Feb 18 2021 at 09:31)</a>:</h4>
<p>Hm, not much changed on the Miri side so this could only be caused by rustc changes. But I'm afraid I won't have time to look into this for the coming weeks.<br>
Cc <span class="user-mention" data-user-id="124288">@oli</span> in case you have any idea what might be causing this. Of course it could also just be CI variance; in my experience CI services are basically useless to evaluate performance.</p>



<a name="226784462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226784462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226784462">(Feb 18 2021 at 09:32)</a>:</h4>
<p>(btw, we have <a class="stream" data-stream-id="269128" href="/#narrow/stream/269128-miri">#miri</a> nowaways :D )</p>



<a name="226814463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226814463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226814463">(Feb 18 2021 at 14:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> would you mind moving this to <a class="stream" data-stream-id="269128" href="/#narrow/stream/269128-miri">#miri</a> when you have a chance?</p>



<a name="226814612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226814612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Notification Bot <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226814612">(Feb 18 2021 at 14:09)</a>:</h4>
<p>This topic was moved here from <a class="stream-topic" data-stream-id="122651" href="/#narrow/stream/122651-general/topic/Miri.20slowing.20down">#general &gt; Miri slowing down</a> by <span class="user-mention silent" data-user-id="116122">simulacrum</span></p>



<a name="226814968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226814968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226814968">(Feb 18 2021 at 14:12)</a>:</h4>
<blockquote>
<p>Of course it could also just be CI variance; in my experience CI services are basically useless to evaluate performance.</p>
</blockquote>
<p>This also reproduced in the same way on my local machine. It’s still a ”big” test in that it’s more than Miri by itself, but I think it’s ok to say it’s not just noisy neighbors.</p>



<a name="226815224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226815224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226815224">(Feb 18 2021 at 14:13)</a>:</h4>
<p>Tangentially, I’m trying out <a href="https://github.com/bheisler/iai">https://github.com/bheisler/iai</a> to get CI-stable benchmarking. It runs cachegrind and captures the number of instructions executed.</p>



<a name="226815429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226815429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226815429">(Feb 18 2021 at 14:15)</a>:</h4>
<p>(Not for the playground, a different project)</p>



<a name="226815938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226815938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226815938">(Feb 18 2021 at 14:19)</a>:</h4>
<p>(the perf stats we are tracking can be seen in the commit messages <a href="https://github.com/shepmaster/sxd-pull-parser/commit/c17bea010f7d3d56dfedb3968b17ccd9a179c0be">https://github.com/shepmaster/sxd-pull-parser/commit/c17bea010f7d3d56dfedb3968b17ccd9a179c0be</a>)</p>



<a name="226849918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226849918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226849918">(Feb 18 2021 at 17:44)</a>:</h4>
<p>I guess a first step for finding out when this was really caused would be to bisect the nightly/CI miri versions over the last month</p>



<a name="226850006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226850006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226850006">(Feb 18 2021 at 17:44)</a>:</h4>
<p>If you want some help with that, I recommend opening an issue on the rustc repo about regressed miri perf and we can ask someone in the bisect team to have a look</p>



<a name="226850101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226850101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226850101">(Feb 18 2021 at 17:45)</a>:</h4>
<p>if it was a rustc change while miri was successfully compiling, we'll get the PR that is at fault, if miri didn't work, we at least get a PR range</p>



<a name="226907623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226907623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226907623">(Feb 19 2021 at 01:06)</a>:</h4>
<div class="codehilite"><pre><span></span><code>% hyperfine -i &#39;cargo +nightly-2020-11-24-x86_64-apple-darwin miri run&#39;
Benchmark #1: cargo +nightly-2020-11-24-x86_64-apple-darwin miri run
  Time (mean ± σ):     578.2 ms ±  25.3 ms    [User: 381.9 ms, System: 169.3 ms]
  Range (min … max):   546.4 ms … 640.7 ms    10 runs

% hyperfine -i -w3 &#39;cargo +nightly miri run&#39;
Benchmark #1: cargo +nightly miri run
  Time (mean ± σ):     634.2 ms ±  17.9 ms    [User: 418.9 ms, System: 183.4 ms]
  Range (min … max):   616.3 ms … 680.1 ms    10 runs

% cargo +nightly --version
cargo 1.51.0-nightly (ab64d1393 2021-02-10)
</code></pre></div>



<a name="226907634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226907634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226907634">(Feb 19 2021 at 01:06)</a>:</h4>
<p>at least based on what I have lying around.</p>



<a name="226997298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/226997298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#226997298">(Feb 19 2021 at 17:22)</a>:</h4>
<p>so that's a 10% slowdown. that would mean your test was close to its 5s limit before already and now something pushed it over the limit?</p>



<a name="227084777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227084777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227084777">(Feb 20 2021 at 11:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> <code>2020-11-24</code> is an interesting one because that's just before the data race detector landed. but I cannot reproduce this, I went back to ce031b4e and that version actually is <em>slower</em> than the latest by &gt;5%. What does <code>cargo +nightly-2020-11-24-x86_64-apple-darwin miri --version</code> say?</p>



<a name="227085036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227085036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227085036">(Feb 20 2021 at 11:19)</a>:</h4>
<p>okay that slowdown doesnt hold up with even olde version; probably only affecting some rsutc versions</p>



<a name="227085052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227085052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227085052">(Feb 20 2021 at 11:19)</a>:</h4>
<div class="codehilite"><pre><span></span><code>$ cargo miri --version &amp;&amp; hyperfine -i -w2 &#39;cargo +miri miri run&#39;
miri 0.1.0 (277b59c0 2021-02-18)
Benchmark #1: cargo +miri miri run
  Time (mean ± σ):     257.3 ms ±   5.0 ms    [User: 171.5 ms, System: 87.9 ms]
  Range (min … max):   250.9 ms … 265.4 ms    11 runs

  Warning: Ignoring non-zero exit code.

$ cargo miri --version &amp;&amp; rm target/ -rf &amp;&amp; hyperfine -i -w2 &#39;cargo +miri miri run&#39;
miri 0.1.0 (a09f8b0c 2020-12-31)
Benchmark #1: cargo +miri miri run
  Time (mean ± σ):     257.9 ms ±   3.8 ms    [User: 168.9 ms, System: 91.1 ms]
  Range (min … max):   253.2 ms … 267.7 ms    11 runs

  Warning: Ignoring non-zero exit code.

$ cargo miri --version &amp;&amp; rm target/ -rf &amp;&amp; hyperfine -i -w2 &#39;cargo +miri miri run&#39;
miri 0.1.0 (ce031b4e 2020-11-22)
Benchmark #1: cargo +miri miri run
  Time (mean ± σ):     275.5 ms ±   2.1 ms    [User: 182.2 ms, System: 95.4 ms]
  Range (min … max):   271.6 ms … 278.5 ms    10 runs

  Warning: Ignoring non-zero exit code.

$ cargo miri --version &amp;&amp; rm target/ -rf &amp;&amp; hyperfine -i -w2 &#39;cargo +miri miri run&#39;
miri 0.1.0 (66a58d43 2020-11-07)
Benchmark #1: cargo +miri miri run
  Time (mean ± σ):     253.6 ms ±   2.3 ms    [User: 165.6 ms, System: 90.5 ms]
  Range (min … max):   251.3 ms … 258.6 ms    11 runs

  Warning: Ignoring non-zero exit code.
</code></pre></div>



<a name="227086666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227086666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227086666">(Feb 20 2021 at 11:53)</a>:</h4>
<p>hm, looks like <em>on the apple target</em>, I do see a slowdown (of 5% though, not 10%):</p>
<div class="codehilite"><pre><span></span><code>$ cargo miri --version &amp;&amp; rm target/ -rf &amp;&amp; hyperfine -i -w2 &#39;cargo +miri miri run --target x86_64-apple-darwin&#39;
miri 0.1.0 (a09f8b0c 2020-12-31)
Benchmark #1: cargo +miri miri run --target x86_64-apple-darwin
  Time (mean ± σ):     258.5 ms ±   3.7 ms    [User: 174.9 ms, System: 85.7 ms]
  Range (min … max):   254.0 ms … 267.8 ms    11 runs

$ cargo miri --version &amp;&amp; rm target/ -rf &amp;&amp; hyperfine -i -w2 &#39;cargo +miri miri run --target x86_64-apple-darwin&#39;
miri 0.1.0 (277b59c0 2021-02-18)
Benchmark #1: cargo +miri miri run --target x86_64-apple-darwin
  Time (mean ± σ):     272.0 ms ±   4.6 ms    [User: 187.2 ms, System: 87.2 ms]
  Range (min … max):   267.3 ms … 280.8 ms    10 runs
</code></pre></div>



<a name="227090834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227090834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227090834">(Feb 20 2021 at 13:11)</a>:</h4>
<p>bisecting that leads to</p>
<div class="codehilite"><pre><span></span><code>853254f467e26ee1d5d46b7079c96c4f53f072a1 is the first bad commit
commit 853254f467e26ee1d5d46b7079c96c4f53f072a1
Merge: c26fa832 28577924
Author: bors &lt;bors@rust-lang.org&gt;
Date:   Sun Jan 24 15:50:51 2021 +0000

    Auto merge of #1675 - hyd-dev:proc-macro-unit-test, r=RalfJung

     [cargo-miri] Skip unit tests of `proc-macro` crates

    Fixes #1660.
</code></pre></div>



<a name="227090855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227090855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227090855">(Feb 20 2021 at 13:11)</a>:</h4>
<p>that's <a href="https://github.com/rust-lang/miri/pull/1675">https://github.com/rust-lang/miri/pull/1675</a></p>



<a name="227090934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227090934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227090934">(Feb 20 2021 at 13:12)</a>:</h4>
<p>looks like this made the JSON a bit more complicated</p>



<a name="227090943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227090943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227090943">(Feb 20 2021 at 13:12)</a>:</h4>
<p>but that's a one-time overhead in the cargo-miri wrapper, so for anything but trivial programs it should be insignificant</p>



<a name="227090955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/227090955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#227090955">(Feb 20 2021 at 13:13)</a>:</h4>
<p>I have no idea why I can only measure this with the macos target though...</p>



<a name="231363262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/231363262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Mazakas <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#231363262">(Mar 22 2021 at 18:44)</a>:</h4>
<p>I've also noticed that Miri can be quite slow</p>
<p>I had a unit test that tested initialize the <code>MyabeUninit</code> half of a dynamic allocation and I had to drop the size of the allocation from 2048 elements to 256 just to get the test to finish in a reasonable timeframe (it was taking minutes).</p>



<a name="231376088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/231376088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#231376088">(Mar 22 2021 at 20:04)</a>:</h4>
<p>did you try turning up the opt-level on the test profile? might help.</p>



<a name="231377095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/231377095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Mazakas <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#231377095">(Mar 22 2021 at 20:12)</a>:</h4>
<p>Ooh, no I didn't. Alright, I'll try that right now</p>



<a name="231377220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/231377220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#231377220">(Mar 22 2021 at 20:13)</a>:</h4>
<p>the danger is that optimizing out some parts of the code can also make the lines that are UB get optimized out, so you end up with UB in debug builds but not release builds.</p>



<a name="231440443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/231440443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#231440443">(Mar 23 2021 at 09:13)</a>:</h4>
<p>yeah, optimizations can easily hide UB (and we are getting more and more MIR optimizations these days so that risk keeps increasing)</p>



<a name="231440506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/231440506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#231440506">(Mar 23 2021 at 09:14)</a>:</h4>
<p><span class="user-mention" data-user-id="399737">@Christian Mazakas</span> for memory-related slowness, <code>-Zmiri-disable-stacked-borrows</code> can do wonders. of course that will also mean aliasing violations are not yet detected, but finding all sorts of other UB can still be useful.</p>



<a name="231482553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/269128-miri/topic/Miri%20slowing%20down/near/231482553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Mazakas <a href="https://rust-lang.github.io/zulip_archive/stream/269128-miri/topic/Miri.20slowing.20down.html#231482553">(Mar 23 2021 at 14:49)</a>:</h4>
<p>Heh, in that <em>that</em> case I think it's far more useful to just reduce the size of the test data. I'd much rather keep all the stack borrow checking than iterate over more elements arbitrarily</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>